<h:panelGroup xmlns:h='http://java.sun.com/jsf/html'
              xmlns:p='http://primefaces.org/ui'
              xmlns:z='http://savanti.com.bo/ui'
              xmlns:e='http://java.sun.com/jsf/composite/ui/component-entity' styleClass='IMJerarquia' id='IMJerarquia'><p:growl/>

<h:panelGrid columns='2' width='100%' styleClass='align-top' cellpadding='0' cellspacing='0'>

<p:tree value='#{IMJerarquia.root}' var='node' selectionMode='single' style='width:100%;border:none'

        selection='#{IMJerarquia.selectedNode}'   rendered='#{not empty IMJerarquia.lsEntity}'>

<p:ajax event='select' update=':#{formId}:jerarquiaId' listener='#{IMJerarquia.onNodeSelect}'/>

<p:treeNode>

<h:outputText value='#{node.codigo} - ' rendered='#{node.nivel lt 3}'/>

<h:outputText title='#{node.nivel} - #{node.codigo}' value=' #{node.nombre}'/>

</p:treeNode>

</p:tree>


<h:panelGroup id='jerarquiaId'>

<z:beanForm bean='#{IMJerarquia}'>

<e:fieldC b='#{bean}' p='Codigo'/>

<e:fieldI b='#{bean}' p='Nombre'/>

<e:fieldI b='#{bean}' p='Nivel'/>

</z:beanForm>


<z:beanTable bean='#{IMJerarquia}'>

<z:columnT t='Nombre' v='#{x.nombre}'/>

<z:columnT t='Nivel'  v='#{x.nivel}'/>

</z:beanTable>

</h:panelGroup>

</h:panelGrid>

</h:panelGroup>